<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
<%@page import="model.Customer"%>


<html>
<head>
<!-- 	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -->
	<title>Display Customers</title>
    	<link href="<s:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
    <title><s:text name="label.customers"/></title>
</head>
<body>

	<h3>Customer overzicht</h3>
	<table  class="borderAll">
		<tr>			
			<td><s:text name="label.customer.id"/></td>
			<td><s:text name="label.customer.categorycode"/></td>
			<td><s:text name="label.customer.typecode"/></td>
			<td><s:text name="label.customer.name"/></td>
			<td><s:text name="label.customer.street"/></td>
			<td><s:text name="label.customer.number"/></td>
			<td><s:text name="label.customer.mailbox"/></td>
			<td><s:text name="label.customer.postalcode"/></td>
			<td><s:text name="label.customer.city"/></td>
			<td><s:text name="label.customer.telephone"/></td>
			<td><s:text name="label.customer.email"/></td>
			<td><s:text name="label.customer.iban"/></td>
			<td><s:text name="label.customer.bic"/></td>
			<td><s:text name="label.customer.active"/></td>
			<td>actie</td>
		</tr>

	<s:iterator value="customers" status = "status">

		<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
			<td class="nowrap"><s:property value = "customerId"/></td>
			<td class="nowrap"><s:property value = "categoryCode"/></td>
			<td class="nowrap"><s:property value = "typeCode"/></td>
			<td class="nowrap"><s:property value = "name"/></td>	
			<td class="nowrap"><s:property value = "street"/></td>
			<td class="nowrap"><s:property value = "number"/></td>
			<td class="nowrap"><s:property value = "mailbox"/></td>
			<td class="nowrap"><s:property value = "postalCode"/></td>	
			<td class="nowrap"><s:property value = "city"/></td>
			<td class="nowrap"><s:property value = "telephone"/></td>
			<td class="nowrap"><s:property value = "email"/></td>
			<td class="nowrap"><s:property value = "iban"/></td>	
			<td class="nowrap"><s:property value = "bic"/></td>	
			<td class="nowrap"><s:property value = "active"/></td>	
			<td class="nowrap">
				<s:form action="Customerrepository!input" >
		      		<s:hidden name="editId" value="%{customerId}"/>
		      		<s:submit value = "edit"/>
		        </s:form>
	     	</td>
		</tr>
	</s:iterator>
	</table>
	<s:form action="Customerrepository!input">
		<s:hidden name="editId" value="0"/>
		<s:submit value="Nieuw Customer" />
	</s:form>
	<p><a href="index.jsp" >Terug naar startpagina</a>.</p>
</body>
</html>